<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php 
			echo $title_for_layout .' '.$title_for_layout_cms; 			
		?>
	</title>
	
	<meta name="Author" content="Sylwester Kowal"/>
	<meta name="Copyright" content="Sylwester Kowal"/>
	<meta name="Language" content="<?php echo Configure::read('Config.language');?>" />	
	<?php
		echo $this->Html->meta('icon','/img/'.HOST.'/favicon.ico');echo "\n";
		echo $this->Html->meta('keywords', $keywords_for_layout_cms);echo "\n";
		echo $this->Html->meta('description', $description_for_layout_cms);echo "\n";
	?>	
	<?php echo $this->Html->script(
		array(
			HOST.'/cufon-yankaff'
			,HOST.'/cufon-yui'
			,'jquery-1.4.3.min'
			,HOST.'/jquery-ui-1.8.16.custom.min'
			,HOST.'/script'
			,'jquery.corner'
			,'jquery.dropdown'
			,HOST.'/sexy-bookmarks-public'
			,'cloud-carousel.1.0.5'
			,'jquery.mousewheel'
			,'jquery.jshowoff.min'
			,'highslide-with-html.packed'			
		)); 
	?>
	
	<!--[if IE 6]>
	<script src="/js/pngIEfix.js" type="text/javascript"></script>
	<script>DD_belatedPNG.fix('.ie6fix');</script>
	<![endif]-->

	
	<?php 
		echo $this->Html->css(array(
			HOST.'/style.'.HOST/*.'_tests'*/
			,HOST.'/custom-theme/jquery-ui-1.8.16.custom'
			,'sexybookmaks-style'
			,HOST.'/menu/dropdown'
			,HOST.'/menu/default.advanced'
			,HOST.'/scrollable-horizontal'
			,HOST.'/jshowoff'
			,'highslide/highslide'
			
		));
		echo $scripts_for_layout;
	?>
	
	<?php		
	echo $javascript->codeBlock("
		if($.support.borderRadius){
			$('.corners').corner('6px');
		}
		
		hs.graphicsDir = '/css/highslide/graphics/';
		hs.outlineType = 'rounded-white';
		hs.wrapperClassName = 'draggable-header';
		hs.align = 'center';
	",$options = array('allowCache'=>false,'safe'=>false,'inline'=>true));
	?>

	<?php echo $google->analytics;?>
</head>
<body>


<div class="main">
	<div class="header">
		
		<div class="logo">
			<a href="/"><?php echo $html->image(HOST."/triton.moon.logo.png")?></a>
		</div>
		<?php $class = ($session->check("Auth.User.id")) ? '-on"' : ''?>
		<div id="user-signup-login-panel<?php echo $class?>" >
			<div id="user-panel-content">
			<?php 
			      if($session->check("Auth.User.id")){?>
			 	<?php //echo $session->read("Auth.User.email")?>  
			    <?php 
			      echo $html->link(__d('store.moon','Logout',true),array('plugin'=>false,'controller'=>'users','action'=>'logout'),array('escape'=>false,'title'=> $session->read("Auth.User.email")));
			      echo '<br/><br/>';
			      echo $html->link($html->image(HOST.'/account.png'),array('plugin'=>false,'controller'=>'users','action'=>'account',$session->read("Auth.User.id")),array('escape'=>false,'title'=>__('Your Account',true)));
			      echo ' ';
			      echo $html->link($html->image(HOST.'/orders.png'),array('plugin'=>'store','controller'=>'orders','action'=>'account',$session->read("Auth.User.id")),array('escape'=>false,'title'=>__('Your Orders',true)));
			      echo '<br/>';
			      echo $html->link($html->image(HOST.'/history.png'),array('plugin'=>'store','controller'=>'products','action'=>'recently'),array('escape'=>false,'title'=>__('Recently Viewed',true)));
			      echo ' ';
			      echo $html->link($html->image(HOST.'/favorite.png'),array('plugin'=>'store','controller'=>'products','action'=>'favorite'),array('escape'=>false,'title'=>__('Favorite',true)));
			      }else{
			      $user = (isset($this->data['User']['id'])) ? $this->data['User']['id'] : null;
			      
			      echo $html->link(__d('store.moon','Register',true),array('plugin'=>false,'controller'=>'users','action'=>'register'),array('escape'=>false));
			      echo ' | ';
			      echo $html->link(__d('store.moon','Login',true),array('plugin'=>false,'controller'=>'users','action'=>'login'),array('escape'=>false));
			     }
			?>
			</div>
		</div>
		<?php echo $this->Store->cart_info();?>
		<?php //echo $this->element('cart_info_top',array('plugin' => 'store')); ?>
		
		<?php echo $this->element('search');?>
		
		<?php echo $this->element('main_menu');?>
		<div class="clr"></div>		
	</div>
	<div class="clr"></div>

	<div class="alerts" title="<?php //echo __d('store','Attention',true)?>">
		<?php 
			$alert = $this->Session->flash();
			$alert .= $this->Session->flash('auth');
			$alert .= $this->Session->flash('email');
			echo $alert;
		?>
	</div>
	<?php 
		if(!empty($alert))
		//echo $this->Js->dialog('.alerts',array('modal'=>true,'height'=> 140),array('allowCache'=>true,'safe'=>false,'inline'=>true));
	?>
	<?php echo $content_for_layout;?>	
</div>
<div class="clr"></div>
<div class="footer">
		<div class="footer-content">
			
			<div class="leftt">
				<h2><?php __d('store.moon','Browse')?></h2>
				<?php echo $this->element('fotter_menu');?>
			</div>
			<div class="midle">
				<h2><?php __d('store.moon','Reference')?></h2>
				<?php echo $this->element('fotter_reference');?>
			</div>
			<div class="rightt"><?php echo $this->element('sexybookmarks');?></div>
			
			<div class="clr"></div>
			<div style="float: right; padding-right: 30px;">© Copyright <a href="http://www.21w.pl">21w.pl</a>. All Rights Reserved</div>
		</div>
		
	<div class="clr"></div>
</div>
<?php echo $this->element('sql_dump');?>
<?php echo $this->Js->writeBuffer();?>
</body>
</html>